package progetto1.csm.core.actor;

public class Client {
	
	private static int IDS = 0;
	
	private final int id;
	
	public Client(){
		id = IDS++;
	}
	
	public int getId(){
		return id;
	}
	
	public static void resetIDS(){
		IDS = 0;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + id;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Client other = (Client) obj;
		if (id != other.id)
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "Client [id=" + id + "]";
	}
}
